package com.shawn.jetpackstady;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import com.shawn.jetpackstady.lifecycle.LifecycleActivity;
import com.shawn.jetpackstady.navigation.NavigationMenuActivity;
import com.shawn.jetpackstady.paging.PagingActivity;
import com.shawn.jetpackstady.room.RoomActivity;

import androidx.appcompat.app.AppCompatActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {


    @BindView(R.id.btn_lifecycle)
    Button btn_lifecycle;
    @BindView(R.id.btn_room)
    Button btn_room;
    @BindView(R.id.btn_paging)
    Button btn_paging;@BindView(R.id.btn_nav)
    Button btn_nav;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
//        if (savedInstanceState == null) {
//            getSupportFragmentManager().beginTransaction()
//                    .replace(R.id.container, MainFragment.newInstance())
//                    .commitNow();
//        }
    }

    @OnClick(R.id.btn_lifecycle)
    public void onClickLifecycle() {
        Intent intent = new Intent(this, LifecycleActivity.class);
        startActivity(intent);
    }

    @OnClick(R.id.btn_room)
    public void onClickRoom() {
        Intent intent = new Intent(this, RoomActivity.class);
        startActivity(intent);
    }

    @OnClick(R.id.btn_paging)
    public void onClickPaging() {
        Intent intent = new Intent(this, PagingActivity.class);
        startActivity(intent);
    }@OnClick(R.id.btn_nav)
    public void onClickNav() {
        Intent intent = new Intent(this, NavigationMenuActivity.class);
        startActivity(intent);
    }

    @Override
    protected void onStart() {
        super.onStart();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onRestart() {
        super.onRestart();
    }

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
